using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using RecruitmentSystem.Business;
using RecruitmentSystem.Common;

public partial class NewsContent : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int newsId = Convert.ToInt32(Request.QueryString["newsid"]);
            DisplayNews(newsId);
        }
    }

    private void DisplayNews(int newsId)
    {
        NewsManager nm = new NewsManager();
        News news = new News();
        news = nm.GetNewsById(newsId);
        if (news != null)
        {
            lbAuthor.Text = news.Author;
            lbContent.Text = news.Content;
            lbCreateTime.Text = news.CreateTime.ToString();
            lbSource.Text = news.Source;
            lbTitle.Text = news.Title;
        }
    }
}
